package com.example.backend.repository;


import com.example.backend.entity.Driver;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.CrudRepository;

import java.util.List;
import java.util.Optional;

public interface DriverRepository  extends JpaRepository<Driver,Integer>, CrudRepository<Driver,Integer> {
    Optional<Driver> findById (Integer id);
    List<Driver> findByName(String name);
    List<Driver> findByIdentity(String identity);
    List<Driver> findByAge(Integer age);
    List<Driver> findByAddress(String address);
    List<Driver> findByPhone(String phone);
    List<Driver> findByLicense(String license);
    List<Driver> findByState(String state);

}
